﻿using System;
using System.Collections.Generic;
using System.Text;
using Attach.Internal;

namespace Attach.Internal
{
    public class Template
    {
        public virtual void TestMethod(int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10) { }
    }

    public class TemplateWrapper : Template
    {
        private ContinueMethod TestMethodBehaviors;

        public TemplateWrapper(Behaviors behaviors1)
        {
            this.SetupBehaviors(behaviors1);
        }

        public override void TestMethod(int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10)
        {
            this.TestMethodBehaviors(new object[] { p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 } );
        }

        public object TestMethodTarget(object[] p)
        {
            base.TestMethod((int)p[0], (int)p[1], (int)p[2], (int)p[3], (int)p[4], (int)p[5], (int)p[6], (int)p[7], (int)p[8], (int)p[9]);
            return null;
        }

        private void SetupBehaviors(Behaviors behaviors1)
        {
            this.TestMethodBehaviors = behaviors1.GetBehaviorsMethod("TestMethod", new ContinueMethod(this.TestMethodTarget));
        }
    }
}
